bake: allow BAKE_CMD_CONTEXT builtin var#671
Conversation
Allows accessing the main context for bake command from bake file that has been imported remotely. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
|
This also fixed the issue where remote URLs were used in bake targets. Previously the values always passed |
crazy-max
left a comment
There was a problem hiding this comment.
@tonistiigi LGTM. In a follow-up, we could reserve variables starting with BAKE_ as we discussed.
| t.ContextPath = inp.URL | ||
| return | ||
| } | ||
| if strings.HasPrefix(t.ContextPath, "cwd://") { |
There was a problem hiding this comment.
I'm not sure if it is a good idea. I don't want users to write it in the bake file. If they do then they break the remote URL case. They should use the variable and this should be the internal behavior of the variable. We should be able to change that to workdir:// for example and no old files should be broken.
We should document the builtin var, and also more docs for vars/attrs in general.
There was a problem hiding this comment.
they break the remote URL
Ah yes right
We should document the builtin var, and also more docs for vars/attrs in general.
👍
fix #641
Allows accessing the main context for bake command from bake
file that has been imported remotely.
Signed-off-by: Tonis Tiigi tonistiigi@gmail.com